package com.wlz.structural.proxy;

import java.util.Date;

public class GamePlayerProxy implements IGamePlayer{
    private IGamePlayer gamePlayer = null;

    public GamePlayerProxy(IGamePlayer _gamePlayer){
        this.gamePlayer = _gamePlayer;
    }

    @Override
    public void login(String user, String password) {
        this.gamePlayer.login(user,password);
        System.out.println("登录时间"+new Date().toString());
        System.out.println("磕一个经验药水");
    }

    @Override
    public void killBoss() {
        System.out.println("杀boss前先磕个力量药水");
        this.gamePlayer.killBoss();
    }

    @Override
    public void upgrade() {
        this.gamePlayer.upgrade();
        System.out.println("升级时间"+new Date().toString());
    }
}
